<html><head>
  <title>NEGATED :nth-child() pseudo-class</title>
  <style type="text/css">.green { background-color : lime ! important; }
ul > li:not(:nth-child(odd)) { background-color : red }
ol > li:not(:nth-child(even)) { background-color : red }
table.t1 tr:not(:nth-child(-n+4)) { background-color : red }
table.t2 td:not(:nth-child(3n+1)) { background-color : red }
table.t1 td, table.t2 td { border : thin black solid }</style>
  <link rel="author" title="Daniel Glazman" href="http://glazman.org/">
  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
  <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"> <!-- bogus link to make sure it gets found -->
  <meta name="flags" content="">
 </head>
 <body>
<ul>
  <li>First list item</li>
  <li class="green">This second list item should have a green background</li>
  <li>Third list</li>
  <li class="green">This fourth list item should have a green background</li>
  <li>Fifth list item</li>
  <li class="green">This sixth list item should have a green background</li>
</ul>
<ol>
  <li class="green">This first list item should have a green background</li>
  <li>Second list item</li>
  <li class="green">This third list item should have a green background</li>
  <li>Fourth list item</li>
  <li class="green">This fifth list item should have a green background</li>
  <li>Sixth list item</li>
</ol>
<div>
<table border="1" class="t1">
  <tbody><tr>
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->1.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->1.2<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
     <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->1.3<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
  <tr>
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->2.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->2.2<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
     <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->2.3<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
  <tr>
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->3.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->3.2<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
     <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->3.3<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
  <tr>
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->4.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->4.2<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
      <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->4.3<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
  <tr class="green">
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->Green row : 5.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->5.2<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->5.3<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
  <tr class="green">
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->Green row : 6.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->6.2<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->6.3<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
</tbody></table>
<p></p>
<table class="t2" border="1">
  <tbody><tr>
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->1.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
      <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->1.4<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
      <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->1.7<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
  <tr>
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->2.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
      <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->2.4<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
      <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->2.7<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
  <tr>
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->3.1<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
      <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->3.4<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
      <!--[ELEMENT('table.t1 td, table.t2 td')]--><td><!--[TEXT('table.t1 td, table.t2 td')]-->3.7<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
<!--[ELEMENT('table.t1 td, table.t2 td')]--><td class="green"><!--[TEXT('table.t1 td, table.t2 td')]-->green cell<!--[/TEXT('table.t1 td, table.t2 td')]--></td><!--[/ELEMENT('table.t1 td, table.t2 td')]-->
</tr>
</tbody></table>
</div>

</body></html>